<template>
  <text class="iconfont" :class="name" :style="[{color: color}]" @click="$emit('click', $event)"></text>
</template>

<script setup lang="ts">
const props = defineProps({
  name: {
    type: String,
    required: true
  },
  color: {
    type: String,
    default: '#fff'
  }
})

const $emit = defineEmits(["click"]);
</script>

<style scoped lang="scss">
@import url("./iconfont.css");

.iconfont {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: inherit;
}
</style>
